Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: Use BitsAndBytesConfig as load_in_* is deprecated #1552

Conversation

BenjaminBossan
Copy link
Member

Don't pass load_in_4bit or load_in_8bit to AutoModel*.from_pretrained, as it is deprecated. Instead, pass the appropriate BitsAndBytesConfig to the quantization_config argument of from_pretrained.

Don't pass load_in_4bit or load_in_8bit to AutoModel*.from_pretrained,
as it is deprecated. Instead, pass the appropriate BitsAndBytesConfig to
the quantization_config argument of from_pretrained.
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great clean up !

@BenjaminBossan BenjaminBossan merged commit 6dca6d2 into huggingface:main Mar 11, 2024
14 checks passed
@BenjaminBossan BenjaminBossan deleted the mnt-deprecation-use-bitsandbytesconfig branch March 11, 2024 14:24
BenjaminBossan added a commit to BenjaminBossan/peft that referenced this pull request Mar 14, 2024
)

Don't pass load_in_4bit or load_in_8bit to AutoModel*.from_pretrained,
as it is deprecated. Instead, pass the appropriate BitsAndBytesConfig to
the quantization_config argument of from_pretrained.
BenjaminBossan added a commit to BenjaminBossan/peft that referenced this pull request Mar 28, 2024
These were caused by an incorrect search and replace operation in huggingface#1552.
BenjaminBossan added a commit that referenced this pull request Apr 5, 2024
Several tests were using bnb_4bit_compute_type but the argument should
be called bnb_4bit_compute_dtype. Now the correct name is used.

This change should not affect the tests, because they were passing the
default value anyway. Therefore, the fact that this argument was passed
incorrectly (and thus, presumably, ignored) should not affect the
results.

Also, fix another incorrect argument to bnb config. These were caused by an
incorrect search and replace operation in #1552.
BenjaminBossan added a commit to BenjaminBossan/peft that referenced this pull request May 30, 2024
Don't pass load_in_8bit to AutoModel.from_pretrained, instead use
BitsAndBytesConfig.

There was already a PR to clean this up (huggingface#1552) but a slightly later
PR (huggingface#1518) re-added this usage.
BenjaminBossan added a commit that referenced this pull request May 30, 2024
Don't pass load_in_8bit to AutoModel.from_pretrained, instead use
BitsAndBytesConfig.

There was already a PR to clean this up (#1552) but a slightly later
PR (#1518) re-added this usage.

---------

Co-authored-by: Younes Belkada <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants